//
// NeL - bindings
// Copyright (C) 2010 Naush
//
//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU Affero General Public License as
//published by the Free Software Foundation, either version 3 of the
//License, or (at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU Affero General Public License for more details.
//
//You should have received a copy of the GNU Affero General Public License
//along with this program.  If not, see <http://www.gnu.org/licenses/>.
package org.ryzom.nel.misc;

public class CUVW {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CUVW(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CUVW obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nelmiscJNI.delete_CUVW(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public void setU(float value) {
    nelmiscJNI.CUVW_U_set(swigCPtr, this, value);
  }

  public float getU() {
    return nelmiscJNI.CUVW_U_get(swigCPtr, this);
  }

  public void setV(float value) {
    nelmiscJNI.CUVW_V_set(swigCPtr, this, value);
  }

  public float getV() {
    return nelmiscJNI.CUVW_V_get(swigCPtr, this);
  }

  public void setW(float value) {
    nelmiscJNI.CUVW_W_set(swigCPtr, this, value);
  }

  public float getW() {
    return nelmiscJNI.CUVW_W_get(swigCPtr, this);
  }

  public CUVW() {
    this(nelmiscJNI.new_CUVW__SWIG_0(), true);
  }

  public CUVW(float u, float v, float w) {
    this(nelmiscJNI.new_CUVW__SWIG_1(u, v, w), true);
  }

  public CUVW add(CUVW v) {
    return new CUVW(nelmiscJNI.CUVW_add(swigCPtr, this, CUVW.getCPtr(v), v), true);
  }

  public CUVW sub(CUVW v) {
    return new CUVW(nelmiscJNI.CUVW_sub(swigCPtr, this, CUVW.getCPtr(v), v), true);
  }

  public CUVW mul(float f) {
    return new CUVW(nelmiscJNI.CUVW_mul(swigCPtr, this, f), true);
  }

  public CUVW mulSelf(float f) {
    return new CUVW(nelmiscJNI.CUVW_mulSelf(swigCPtr, this, f), false);
  }

  public CUVW addSelf(CUVW v) {
    return new CUVW(nelmiscJNI.CUVW_addSelf(swigCPtr, this, CUVW.getCPtr(v), v), false);
  }

  public CUVW subSelf(CUVW v) {
    return new CUVW(nelmiscJNI.CUVW_subSelf(swigCPtr, this, CUVW.getCPtr(v), v), false);
  }

  public boolean lt(CUVW o) {
    return nelmiscJNI.CUVW_lt(swigCPtr, this, CUVW.getCPtr(o), o);
  }

  public boolean isEqual(CUVW c) {
    return nelmiscJNI.CUVW_isEqual(swigCPtr, this, CUVW.getCPtr(c), c);
  }

  public boolean notEqual(CUVW c) {
    return nelmiscJNI.CUVW_notEqual(swigCPtr, this, CUVW.getCPtr(c), c);
  }

  public void serial(IStream f) {
    nelmiscJNI.CUVW_serial(swigCPtr, this, IStream.getCPtr(f), f);
  }

}
